package cn.hackcloud.mutithread.mutilthread.join;

public class MyThread extends Thread {
	@Override
	public void run() {
		try {
			int secondValue = (int) (Math.random() * 1000);
			System.out.println(secondValue);
			Thread.sleep(secondValue);
		} catch (Exception e) {
		}
	}

	public static void main(String[] args) {
		try {
			MyThread myThread = new MyThread();
			myThread.start();
			myThread.join(200);
			System.out.println("我想MyThread执行完毕我再执行");
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}
